<?php
/**
 * CEOfox
 *
 * @copyright  Copyright 2011-2012 CEOfox, Inc.
 * @license    http://ceofox.com/pages/license
 * @version    $Id: topfollow.html.php 87082 2013-05-24 09:40:17 $
 * @author     CEOfox, Inc.
 */
?>
<?php
 defined('PHPFOX') or exit('NO DICE!');
?>
<script>$Core.loadStaticFile('{$sCoreUrl}module/follow/static/css/default/default/follow.css')</script>
    {if count($aTopFollwings) > 0}   
    <div class="title_top_following">{phrase var='follow.top_following'}</div>
    <div class="top-following">
        {foreach from=$aTopFollwings item=aUser name=user}
            <div id="js_following_{$aUser.user_id}" class="following-user">
                <div class="following_image" id="js_image_div_{$aUser.user_id}">    
                    {img id='sJsUserImage_'$aUser.user_id'' user=$aUser suffix='_50_square' max_width=50 max_height=50}
                </div>
                
                <div class="following_info">
                    {$aUser|user:'':'':30|split:30} 
                    <p>{phrase var='follow.followers'}: <strong>
                    {$aUser.total_followers}
                    </strong></p>
                    <p>{phrase var='follow.following'}: <strong>{$aUser.total_following}</strong></p>
                </div>
                {if $aUser.canFollow && $aUser.isFollow == 0 and Phpfox::isUser()}
                <div class="follow-too">
                    <a class="follow-inline-btn follow_{$sType}_{$aUser.user_id}" href="{url link='follow.add' id=Phpfox::getUserId() type=$sType oid=$aUser.user_id}"><span class="following follow-button" style="float:right;margin-top:7px;">{phrase var='follow.follow'}</span></a>
                    
                    <a style="display:none;" class="follow-inline-btn unfollow_{$sType}_{$aUser.user_id}" href="{url link='follow.del' id=Phpfox::getUserId() type=$sType oid=$aUser.user_id}"><span class="following follow-button" style="float:right;margin-top:7px;">{phrase var='follow.unfollow'}</span></a>
                </div>
                {else}
                    {if $aUser.canFollow and $aUser.isFollow == 1 and Phpfox::isUser()}
                    <div class="follow-too">
                        <a class="follow-inline-btn unfollow_{$sType}_{$aUser.user_id}" href="{url link='follow.del' id=Phpfox::getUserId() type=$sType oid=$aUser.user_id}"><span class="following follow-button" style="float:right;margin-top:7px;">{phrase var='follow.unfollow'}</span></a>
                        
                        <a style="display:none;" class="follow-inline-btn follow_{$sType}_{$aUser.user_id}" href="{url link='follow.add' id=Phpfox::getUserId() type=$sType oid=$aUser.user_id}"><span class="following follow-button" style="float:right;margin-top:7px;">{phrase var='follow.follow'}</span></a>
                    </div>
                    {/if}
                {/if}
            <div class="clear"></div>
            </div>

        {/foreach}
    </div>
    {/if}